//
//  CollReuseV.swift
//  AliBaiChuan
//
//  Created by 郑东喜 on 2017/2/22.
//  Copyright © 2017年 郑东喜. All rights reserved.
//  UICollectionReusableView

import UIKit

class CollReuseV: UICollectionReusableView {
    
    fileprivate let margin : CGFloat = 5
    
    
    //标题
    lazy var titleView: UILabel = {
        let lab : UILabel = UILabel.init(frame: CGRect.init(x: self.margin, y: self.margin, width: SW - 2 * self.margin, height: 30))
        lab.text = "测试吧"
        lab.textColor = UIColor.red
        return lab
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.backgroundColor = UIColor.white
        self.prepareUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}

extension CollReuseV {
    fileprivate func prepareUI() -> Void {
        self.addSubview(titleView)
    }
}
